﻿var $url = '/enrollment/search';

var data = {
    apiUrl: utils.getQueryString('apiUrl'),
    siteId: utils.getQueryString('siteId'),
    key: utils.getQueryString('key'),
    keyword: utils.getQueryString('keyword'),
    pageLoad: false,
    contents: []
};

var methods = {

    loadPage: function () {
        var $this = this;
        
        $api.get($url, {
            params: {
                siteId: $this.siteId,
                key: $this.key,
                keyword: $this.keyword
            }
        }).then(function (response) {
            //获取报名
            $this.pageLoad = true;
            $this.contents = response.data.result;
        });
    },

};

var $vue = new Vue({
    el: '#main',
    data: data,
    methods: methods,
    computed: {
    },
    created: function () {
        this.loadPage();
    }
});